<?php
namespace app\api\Validate;

use think\Validate;

/**
 * 用户验证类
 */
class UserValidate extends Validate
{
    protected $rule = [
        'code' => 'require',
        'openid' => 'require',
        'username' => 'require',
        'gender' => 'require',
        'identity' => 'require',
        'address' => 'require',
        'birthDate' => 'require',
        'mobile' => 'require',
        'unemployedimage' => 'require',
        'unemployedcode' => 'require',
        'identityimage' => 'require',
        'identityfimage' => 'require',
        'ide' => 'require',
    ];
    protected $message = [
        'code.require'  => 'code不能为空',
        'openid.require'  => 'openid不能为空',
        'username.require'  => '姓名不能为空',
        'gender.require'  => '性别不能为空',
        'identity.require'  => '身份不能为空',
        'address.require'  => '现居地址不能为空',
        'birthDate.require'  => '出生时间不能为空',
        'mobile.require'  => '手机号不能为空',
        'unemployedimage.require'  => '失业证书不能为空',
        'unemployedcode.require'  => '失业证书编号不能为空',
        'identityimage.require'  => '身份证正面不能为空',
        'identityfimage.require'  => '身份证反面不能为空',
        'ide.require'  => '身份证号不能为空',
    ];
    protected $scene = [
        'registers' => [
            // 'code',
            'username',
            'gender',
            'identity',
            'address',
            'birthDate',
            'mobile',
            // 'unemployedimage',
            // 'unemployedcode',
            // 'identityimageidentityimage',
            // 'identityfimage',
            // 'ide',
            ],
    ];
}